import Vue from 'vue'
import VueRouter from 'vue-router'
// import Login from '../pages/Login'
import Home from '../pages/Home'
import GCpage from '../pages/GC'


Vue.use(VueRouter)

const router = new VueRouter({
  mode: 'hash',
  routes: [
    { path: '/', redirect: '/Home' },
    // { path: '/Login', name: 'Login', component: Login },
    { path: '/Home', name: 'HomePage', component: Home },
    { path: '/GCpage', name: 'GCpage', component: GCpage }
  ]
});
// router.beforeEach((to, from, next) => {
//   if (to.path == '/Login') {
//     next()
//   } else {
//     let token = localStorage.getItem('token');
//     if (token === 'null' || !token) {
//       next('/Login')
//     } else {
//       next();
//     }
//   }
// });
export default router;
